<?php
include ('config.php');
$sql="select * from page ORDER by pid desc limit 0,10";
$sql_result=$db->query($sql);
$sql_page=array();
while ($is=$sql_result->fetch_array(MYSQLI_ASSOC)){
    $sql_page[]=$is;
}
?>
<!DOCTYPE HTML>
<html>
<head>
    <meta charset="utf-8"/>
    <title><?php echo $setting['title'] ?></title>
    <?php include (PATH.'/header.inc.php'); ?>

</head>
<body>
    <div class="container">
            <div class="jumbotron">
                <h1><?php echo $setting['title'] ?></h1>
                <p><?php echo $setting['intro'] ?></p>
            </div>
    </div>
    <div class="container">
        <div class="row">
            <div class="col-md-3">
                    <div class="panel panel-default">
                        <div class="panel-heading">
                            <h3 class="panel-title">作者简介</h3>
                        </div>
                        <div class="panel-body">
                            这里来内容
                        </div>
                    </div>
                    <div class="panel panel-default">
                        <div class="panel-heading">
                            <h3 class="panel-title">统计数据</h3>
                        </div>
                        <div class="panel-body">
                            可以放一些数据统计
                        </div>
                    </div>
            </div>
            <div class="col-md-9">
                <?php foreach ($sql_page as $is):?>
                    <div class="panel panel-default">
                            <div class="panel-heading">
                                <h3 class="panel-title"><?php echo $is['title']?></h3>
                            </div>
                            <div class="panel-body">
                               <?php echo mb_substr($is['contact'],0,100) ;?>
                            </div>
                    </div>
                <?php endforeach;?>
            </div>
        </div>
    </div>
</body>
</html>
